﻿@typeparam TItem
@inherits _BaseDataGridRowMultiSelect<TItem>
<TableRowCell @onclick:preventDefault Class="@(Column.CellClass?.Invoke(Item))" Style="@BuildCellStyle()" TextAlignment="@Column.TextAlignment" VerticalAlignment="@Column.VerticalAlignment" Display="@Column.Display">
    @if ( ParentDataGrid.MultiSelectColumn?.MultiSelectTemplate != null )
    {
        <Label @onclick="@OnCheckedClicked">
            @ParentDataGrid.MultiSelectColumn.MultiSelectTemplate( new( EventCallback.Factory.Create( this, new Func<bool, Task>( OnCheckedChanged ) ), Checked, false, Item ) )
        </Label>
    }
    else
    {
        <Label @onclick="@OnCheckedClicked">
            <Check TValue="bool" Checked="@Checked" CheckedChanged="@OnCheckedChanged" CheckedExpression="@(()=> Checked)"></Check>
        </Label>
    }
</TableRowCell>